function createButton(attrs,text){
	var $btn=document.createElement("button");
	for(var key in attrs){
		$btn.setAttribute(key,attrs[key]);
	}
	$btn.innerHTML='<span class="glyphicon glyphicon-pencil"></span>&nbsp;' + text;
	return $btn;
}